;
(function (window, angular) {
    'use strict';
    angular.module("Controller.Purchase", ["Controller.Purchase.Supplier", "Controller.Purchase.SupplierClass",
        "Controller.Purchase.PriceSearch", "Controller.Purchase.JckPriceSearch", "Controller.Purchase.SalesPriceSearch",
        "Controller.Purchase.Plan", "Controller.Purchase.PurchaseOrder", "Controller.Purchase.PurchaseOrderJck",
        "Controller.Purchase.BackOrder", "Controller.Purchase.AgentStorePlanCtrl", "Controller.Purchase.AgentSummaryPlanCtrl",
        "Controller.Purchase.Price",  "Controller.Purchase.SocialApply","Controller.Purchase.NCMMaintain",
        "Controller.Purchase.DealerInOutCase","Controller.Purchase.PurchasePlanRpt", "Controller.Purchase.SchemaPriceSearch",
        "Controller.Purchase.PotentialSupplier","Controller.Purchase.PlanDealer", "Controller.Purchase.DealerPlanData",
        "Controller.Purchase.DealerPlan",
    ])
        .config(['$stateProvider', function ($stateProvider) {

            $stateProvider.state("app.purchase.potentialSupplier", {
                is18n: true,
                url: "/potentialSupplier",
                templateUrl: "view/purchase/potentialSupplier.html",
                controller: "PotentialSupplierCtrl"
            });

            $stateProvider.state("app.purchase.supplier", {
                is18n: true,
                url: "/supplier",
                templateUrl: "view/purchase/supplier.html",
                controller: "SupplierCtrl"
            });

            $stateProvider.state("app.purchase.supplierClass", {
                is18n: true,
                url: "/supplierClass",
                templateUrl: "view/purchase/supplierClass.html",
                controller: "SupplierClassCtrl"
            });

            $stateProvider.state("app.purchase.plan", {
                url: "/plan",
                templateUrl: "view/purchase/plan.html",
                controller: "PlanCtrl"
            });

            $stateProvider.state("app.purchase.order", {
                is18n: true,
                url: "/order",
                templateUrl: "view/purchase/purchaseOrder.html",
                controller: "PurchaseOrderCtrl",
                params: {
                    billNo: '',
                }
            });

            $stateProvider.state("app.purchase.planDealer", {
                is18n: true,
                url: "/planDealer",
                templateUrl: "view/purchase/planDealer.html",
                controller: "PlanDealerCtrl",
            });

            $stateProvider.state("app.purchase.orderJck", {
                is18n: true,
                url: "/purchaseOrderJck",
                templateUrl: "view/purchase/purchaseOrderJck.html",
                controller: "PurchaseOrderJckCtrl"
            });
            $stateProvider.state("app.purchase.priceSearch", {
                is18n: true,
                url: "/priceSearch",
                templateUrl: "view/purchase/priceSearch.html",
                controller: "PriceSearchCtrl"
            });
            $stateProvider.state("app.purchase.jckPriceSearch", {
                is18n: true,
                url: "/jckPriceSearch",
                templateUrl: "view/purchase/jckPriceSearch.html",
                controller: "JckPriceSearchCtrl"
            });
            $stateProvider.state("app.purchase.salesPriceSearch", {
                is18n: true,
                url: "/salesPriceSearch",
                templateUrl: "view/purchase/salesPriceSearch.html",
                controller: "SalesPriceSearchCtrl"
            });

            $stateProvider.state("app.purchase.backOrder", {
                url: "/backOrder",
                templateUrl: "view/purchase/backOrder.html",
                controller: "BackOrderCtrl"
            });

            $stateProvider.state("app.purchase.ncm", {
                is18n: true,
                url: "/nCMMaintain",
                templateUrl: "view/purchase/nCMMaintain.html",
                controller: "NCMMaintainCtrl"
            });

            $stateProvider.state("app.purchase.agentStorePlan", {
                url: "/agentStorePlan",
                templateUrl: "view/purchase/agentStorePlan.html",
                controller: "AgentStorePlanCtrl"
            });

            $stateProvider.state("app.purchase.agentSummaryPlan", {
                url: "/agentSummaryPlan",
                templateUrl: "view/purchase/agentSummaryPlan.html",
                controller: "AgentSummaryPlanCtrl"
            });

            $stateProvider.state("app.purchase.price", {
                url: "/price",
                templateUrl: "view/purchase/price.html",
                controller: "PriceCtrl"
            });

            $stateProvider.state("app.purchase.socialApply", {
                url: "/socialApply",
                templateUrl: "view/purchase/socialApply.html",
                controller: "SocialApplyCtrl"
            });

            $stateProvider.state("app.purchase.dealerInOutCase", {
                url: "/dealerInOutCase",
                templateUrl: "view/purchase/dealerInOutCase.html",
                controller: "DealerInOutCaseCtrl"
            });

            $stateProvider.state("app.purchase.purchasePlanRpt", {
                url: "/purchasePlanRpt",
                templateUrl: "view/purchase/purchasePlanRpt.html",
                controller: "PurchasePlanRptCtrl"
            });
            $stateProvider.state("app.purchase.schemaPriceSearch", {
                is18n: true,
                url: "/schemaPriceSearch",
                templateUrl: "view/purchase/schemaPriceSearch.html",
                controller: "SchemaPriceSearchCtrl"
            });

            $stateProvider.state("app.purchase.dealerPlanData", {
                is18n: true,
                url: "/dealerPlanData",
                templateUrl: "view/purchase/dealerPlanData.html",
                controller: "DealerPlanDataCtrl"
            });

            $stateProvider.state("app.purchase.dealerPlan", {
                is18n: true,
                url: "/dealerPlan",
                templateUrl: "view/purchase/dealerPlan.html",
                controller: "DealerPlanCtrl"
            });

        }]);
})(window, window.angular);
